<template>
  <BasicContainer>
    <ElDescriptions title="个人档案" direction="vertical" :column="4" border>
      <ElDescriptionsItem label="编号"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.personNumber }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="登录名称"
        ><ElTag>{{ sysUser.username }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="姓名"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.name }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="身份证号"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.idNumber }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="籍贯"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.nativePlace }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="出生日期"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.birthday }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="户口所在地" :span="2"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.hukou }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="婚姻状况"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.maritalStatus }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="性别"
        ><ElTag>{{
          userInfoDetail === null
            ? ''
            : userInfoDetail.gender === '0'
            ? '女'
            : userInfoDetail.gender === '1'
            ? '男'
            : '其他'
        }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="名族"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.nation }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="出生地"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.birthplace }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="参加工作时间"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.workdate }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="健康状态"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.health }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="最高学历"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.degree }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="人员状态"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.status }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="人员类型"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.type }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="电话号码"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.telephone }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="手机号码"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.mobile }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="职务"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.post }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="入职本单位时间"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.enterdeptDate }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="职称"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.profesTitle }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="电子邮件"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.email }}</ElTag></ElDescriptionsItem
      >
      <ElDescriptionsItem label="传真"
        ><ElTag>{{ userInfoDetail === null ? '' : userInfoDetail.faxno }}</ElTag></ElDescriptionsItem
      >
    </ElDescriptions>
  </BasicContainer>
</template>

<script>
  import { mapState } from 'vuex'

  export default {
    name: 'PersonnelFile',
    components: {},
    data() {
      return {}
    },
    computed: {
      ...mapState('user', ['sysUser', 'userInfoDetail'])
    },
    created() {
      this.init()
    },
    methods: {
      init() {
        // console.log(this.userInfoDetail, this.sysUser)
      }
    }
  }
</script>
